
import javax.swing.JFrame;
//import javax.swing.JLabel;
import javax.swing.Timer;


@SuppressWarnings("serial")
public class game extends JFrame  {
	public static int delay = 1000;
    public static boolean gameover=false;
	public static Timer  myTimer;
    private final static String TitleBar = "Pentris game group 11";
    //private JLabel item1;
    
    public game()
    {
        add(new GUI());
        setTitle(TitleBar);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setSize(500, 600);
        setVisible(true);
        setResizable(false);
    }
        
    
    
    public static void main(String[] args) {
    	
    	
        
        timerx mytimerx = new timerx();
        myTimer = new Timer( delay, mytimerx);

        board.createPento();
        board.checkAndPlace();
        board.printBoard();
        
        myTimer.start();
        
        while(!gameover) {
            
            if (gameover)
            {
                myTimer.stop();
            }
            
        }
        
        System.out.println("HELLLLLLOOO");
        
    
        
        
 /*       
       
        Scanner in=new Scanner(System.in);
        
    while (!gameover)            //while the pento isnt on the bottom (this is a very simple test main method to present the functionality of the placing and moving methods)
    {
        System.out.println();            // Space lines improve readability...
        System.out.println("1=left, 2=down, 3=right, 4=turn clockwise, 5=counterclockwise, 6=drop");
        int input=in.nextInt();
        
        if(input==1)
        {
            board.moveLeft();
            board.printBoard();
        }
        else if(input==2)
        {
            board.moveDown();
            board.printBoard();
        }
        else if(input==3)
        {
            board.moveRight();
            board.printBoard();
        }
        else if(input==4)
        {
            board.turnCW();
            board.printBoard();
        }
        else if(input==5)
        {
            board.turnCCW();
            board.printBoard();
        }
        else if(input==6)
        {
            board.drop();
            board.printBoard();
        }
        else
        {
            System.out.println("plase press a number between 1 and 6...");
        }
        
        if(!board.possibleDown)
        {
            board.createPento();
            board.checkAndPlace();
            board.printBoard();
        }
    }
    
        */
     
        
        
    }

    
    
  
}